package com.itheima.service;

import com.github.pagehelper.PageInfo;
import com.itheima.domain.User;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Transactional(readOnly = true)
public interface UserService {
    @Transactional(readOnly = false)
    boolean save(User user);
    @Transactional(readOnly = false)
    boolean update(User user);
    @Transactional(readOnly = false)
    boolean delete(Integer id);

    User findById(Integer id);

    PageInfo<User> findAll(Integer page,Integer size);

    User login(String username,String password);
}
